package com.qianying.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商场信息实体类
 * 映射数据库中的mall_info表
 */
@Data
@TableName("mall_info")
@Schema(description = "商场信息实体类，存储商场的基本信息")
public class MallInfo {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID，自增", example = "1")
    private Long id;

    @TableField("mall_name")
    @Schema(description = "商场名称，唯一", required = true, example = "天河商场")
    private String mallName;

    @TableField("mall_code")
    @Schema(description = "商场编号，唯一", example = "201")
    private String mallCode;

    @TableField("province_id")
    @Schema(description = "省编码（关联china_area表的code字段）", example = "440000")
    private String provinceId;

    @TableField(exist = false)
    private String provinceName;

    @TableField("city_id")
    @Schema(description = "市编码（关联china_area表的code字段）", example = "440100")
    private String cityId;

    @TableField(exist = false)
    private String cityName;

    @TableField("district_id")
    @Schema(description = "区/县编码（关联china_area表的code字段）", example = "440106")
    private String districtId;

    @TableField(exist = false)
    private String districtName;

    @TableField("mall_address")
    @Schema(description = "商场详细地址", example = "天河路111号")
    private String mallAddress;

    @TableField("handling_fee")
    @Schema(description = "办证费", example = "25.00")
    private BigDecimal handlingFee;

    @TableField("status")
    @Schema(description = "启用状态（0-禁用，1-启用）", example = "1")
    private Integer status;

    @TableField("description")
    @Schema(description = "商场描述", example = "地处体育西中心地带的优质商场")
    private String description;

    @TableField("create_time")
    @Schema(description = "记录创建时间，自动生成", example = "2025-08-05T10:30:00")
    private Date createTime;

    @TableField("update_time")
    @Schema(description = "记录最后更新时间，自动更新", example = "2025-08-05T15:45:00")
    private Date updateTime;
}